<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;

class UserFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'username'=>$this->faker->userName,
            'truename'=>$this->faker->name(),
            //bcrypt() 这个函数 相当于是password_hash()
            'password'=>bcrypt('admin888'),
            'email'=>$this->faker->email,
            'phone'=>$this->faker->phoneNumber,
            'sex'=>['先生','女士'][rand(0,1)]
        ];

    }
}
